import { Module, forwardRef } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Song } from './song.entity';
import { SongLike } from './song-like.entity';
import { SongCollection } from './song-collection.entity';
import { SongController } from './song.controller';
import { SongService } from './song.service';
import { UserModule } from '../user/user.module';
import { User } from '../user/user.entity';
import { MyMusicModule } from '../my-music/my-music.module';
// import { CategoryModule } from '../category/category.module';
import { Category } from '../category/category.entity';
import { Singer } from '../singer/singer.entity';
import { Album } from '../album/album.entity';

@Module({
  imports: [
    TypeOrmModule.forFeature([
      Song,
      SongLike,
      SongCollection,
      User,
      Category,
      Singer,
      Album,
    ]),
    UserModule,
    forwardRef(() => MyMusicModule),
  ],
  controllers: [SongController],
  providers: [SongService],
  exports: [SongService],
})
export class SongModule {}
